package com.tueye.entity.user;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.tueye.entity.BaseEntity;
import com.tueye.entity.Comment;

/**
 * 用户基本信息
 * 
 * @author hanxiaowei
 * modify by yue 09/2/19
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "tueye_userbase_info")
public class User extends BaseEntity {

	private String Email; //登录名称,可以是Email
	private String byname; //用户匿称
	private String password; //用户密码
	private Integer isValid;// #0 代表可用,#1代表不可用 (这个字段暂时不用)
	private String userPoto; //用户头像
	private String intoduce; //自我介绍
	private String nowHome; //现居地
	private String activeArea; //活动区域
	private String homeplace; //出生地 
	
	private  List<ParticularUserInfo> particularuserinfo; 
  
	private String realName; //真实姓名
	private String phone;//联系电话
	
	private List<UserCollectionInfo> userCollectionInfo;
	//用户留言
	 private List<Comment> userComments;
	 
	 private List<UserBlogInfo> userBlogInfo;

	@Column(name = "byname", length = 40)
	public String getByname() {
		return byname;
	}
	public void setByname(String byname) {
		this.byname = byname;
	}
	@Column(name = "password", length = 40)
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	@Column(name = "isValid", length = 2)
	public Integer getIsValid() {
		return isValid;
	}
	public void setIsValid(Integer isValid) {
		this.isValid = isValid;
	}
     
     
	public String getEmail() {
		return Email;
	}
	public void setEmail(String email) {
		Email = email;
	}
	public String getUserPoto() {
		return userPoto;
	}
	public void setUserPoto(String userPoto) {
		this.userPoto = userPoto;
	}
	public String getIntoduce() {
		return intoduce;
	}
	public void setIntoduce(String intoduce) {
		this.intoduce = intoduce;
	}
	public String getNowHome() {
		return nowHome;
	}
	public void setNowHome(String nowHome) {
		this.nowHome = nowHome;
	}
	public String getActiveArea() {
		return activeArea;
	}
	public void setActiveArea(String activeArea) {
		this.activeArea = activeArea;
	}
	public String getHomeplace() {
		return homeplace;
	}
	public void setHomeplace(String homeplace) {
		this.homeplace = homeplace;
	}
	 
 
	public String getRealName() {
		return realName;
	}
	public void setRealName(String realName) {
		this.realName = realName;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	 
	 
	@OneToMany(mappedBy ="user",cascade=CascadeType.ALL) 
	public List<UserCollectionInfo> getUserCollectionInfo() {
		return userCollectionInfo;
	}
	public void setUserCollectionInfo(List<UserCollectionInfo> userCollectionInfo) {
		this.userCollectionInfo = userCollectionInfo;
	}
	
	@OneToMany(mappedBy ="user",cascade=CascadeType.ALL) 
	public List<UserBlogInfo> getUserBlogInfo() {
		return userBlogInfo;
	}
	public void setUserBlogInfo(List<UserBlogInfo> userBlogInfo) {
		this.userBlogInfo = userBlogInfo;
	}
	@OneToMany(mappedBy ="user",cascade=CascadeType.ALL) 
	public List<ParticularUserInfo> getParticularuserinfo() {
		return particularuserinfo;
	}
	public void setParticularuserinfo(List<ParticularUserInfo> particularuserinfo) {
		this.particularuserinfo = particularuserinfo;
	}
	
	@OneToMany(mappedBy ="user",cascade=CascadeType.ALL) 
	public List<Comment> getUserComments() {
		return userComments;
	}
	public void setUserComments(List<Comment> userComments) {
		this.userComments = userComments;
	}
	
	
}
